package com.ruoyi.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.business.domain.HomeworkStuAnswer;
import com.ruoyi.business.domain.bo.EvaluationBo;
import com.ruoyi.business.domain.bo.HomeworkStuAnswerBo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 最爱喝兽奶
 * @create 2022/9/29
 **/
public interface HomeworkStuAnswerMapper extends BaseMapper<HomeworkStuAnswer> {

    /**
     * 根据传入的作业id查询提交作业的学生人数
     * @param id
     * @return
     */
    Integer querySubmitCount(@Param("homeworkId") String id);

    /**
     * 根据传入的作业id，查询完成了作业的学生信息
     * @param homeworkId
     * @return
     */
    List<String> queryEvaluationStudent(@Param("homeworkId") String homeworkId);

    /**
     * 修改主观题分数，根据用户传入的互评分数
     * @param bo
     */
    void updateScoreByQuestion(HomeworkStuAnswerBo bo);
}
